﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class MeetingBLL : BaseBLL<Meeting>
    {
        public Meeting entity = new Meeting();
        MeetingDAO dao = new MeetingDAO();
        public override Meeting GetModel()
        {
            return entity;
        }
        /// <summary>
        /// 查询历史会议
        /// </summary>
        /// <param name="state"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Meeting> GetListPagingHistory(int state, int page, int pagesize)
        {
            return dao.GetListPagingHistory(state, page, pagesize);
        }

        /// <summary>
        /// 查询即将开始会议
        /// </summary>
        /// <param name="state"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Meeting> GetListPagingFuture(int state, int page, int pagesize)
        {
            return dao.GetListPagingFuture(state, page, pagesize);
        }


        /// <summary>
        /// 查询到期会议目数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        /// 
        public int GetListPagingHistory(int state)
        {
            return dao.GetListPagingHistory(state);
        }

         /// <summary>
        /// 查询将要开始会议目数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        /// 
        public int GetListPagingFuture(int state)
        {
            return dao.GetListPagingFuture(state);
        }


         /// <summary>
        /// 根据领受任务用户和状态查询任务信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<Meeting> GetListPagingByWorker(int page, int pagesize, string worker, int state)
        {
            return dao.GetListPagingByWorker(page,pagesize,worker,state);
        }
        /// <summary>
        /// 根据领受任务用户和状态查询任务信息条目数
        /// </summary>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPagingByWorker(string worker, int state)
        {
            return dao.GetListPagingByWorker(worker, state);
        }


         /// <summary>
        /// 查询当前用户未到的会议
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<Meeting> GetListPagingByWorkerFuture(int page, int pagesize, string worker, int state)
        {
           return dao.GetListPagingByWorkerFuture(page,pagesize,worker,state);
        }
        /// <summary>
        /// 查询当前用户未到的会议数目
        /// </summary>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPagingByWorkerFuture(string worker, int state)
        {
            return dao.GetListPagingByWorkerFuture(worker, state);
        }
       
    }
}
